// SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
// SPDX-License-Identifier: Mulan PSL v2
package com.geniusai.aip.auth.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

/**
 * @author hml14563
 * @date 2021/4/15
 */
@Data
public class EditEntity {

    private String password;

    @Range(min = 0, max = 1)
    @NotNull(message = "角色不能为为空")
    private Integer role;

    @NotNull(message = "cpu的个数为(1,256)非负数")
    @Range(min = 1, max = 256, message = "cpu的个数为(1,256)非负数")
    private Float cpuNum;

    @JsonProperty(value = "vGpuMemory")
    private Integer vGpuMemory;

    @NotNull(message = "内存大小为[1-256]非负整数")
    @Range(min = 1, max = 256, message = "内存大小为[1-256]非负整数")
    private Integer memorySize;

    @NotNull(message = "存储空间大小不能为空")
    @Range(min = 1, message = "存储空间大小")
    private Integer volumeSize;

    @Range(min = 0, max = 3, message = "参数dataSpaceEditFlag为[0-3]非负整数")
    private Integer dataSpaceEditFlag;

    private String dataSpaceName;

    private Integer datasetCapacity;

    private String dataSpaceCapacity;

    private String username;

    private String userId;
}
